import java.io.File;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ZhongJinTao
 * Date: 2024-03-03
 * Time: 12:19
 */
public class IODemo1 {
    public static void main(String[] args) {
        //指定文件的路径
        File f1 = new File("C:/IOTest/test.txt");//绝对路径
        System.out.println(f1.getPath());//返回File对象的⽂件路径
        System.out.println(f1.getParent());//返回 File 对象的⽗⽬录⽂件路径
        System.out.println(f1.getName());//返回 FIle 对象的纯⽂件名称
    }
}
